<%--
  Created by IntelliJ IDEA.
  com.yishu.entity.User: 自由如风
  Date: 2018/6/6
  Time: 15:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>

    <style type="text/css">
        * {
            padding: 0;
            margin: 0;
        }

        body {
            font-size: 12px;
            color: #000;
            line-height: 100px;
        }

        .left{width:35%;
            text-align:left;
            height:25px;
        }

        .main {
            float: none;
            margin-top: 0px;
            margin-right: auto;
            margin-bottom: 0px;
            margin-left: auto;
            clear: both;
        }

       /* #header {
            background-image: url(./images/bg.gif);
            background-repeat: repeat-x;
            height: 36px;
        }*/

        #headerLeft {
            width: 0px;
            float: left;
        }

        #headerRight {
            width: 160px;
            float: right;
            color: #FFF;
        }

        #center {
            width: 362px;
            text-align: center;
            margin-top: 20px;
            margin-right: auto;
            margin-bottom: 20px;
            margin-left: auto;

        }

        .inputs {
            width: 200px;
            height: 20px;
            border: solid 1px #666666;

        }

        .bold {
            font-size: 18px;
            font-weight: bold;
            text-align: center;
            line-height: 45px;
            height: 40px;
        }

        .rb1 {
            height: 23px;
            color: #fff;
            font-size: 13px;
            background: #d32c47;
            padding: 3px 10px;
            border-left: 1px solid #fff;
            border-top: 1px solid #fff;
            border-right: 1px solid #6a6a6a;
            border-bottom: 1px solid #6a6a6a;
            cursor: pointer;
        }

        #footer {
            text-align: center;
            color: #333;
            line-height: 35px;
        }

        #footer a {
            color: #333;
            text-decoration: underline;
        }

        #footer hover {
            color: #333;
            text-decoration: none;
        }
    </style>

    <script src="${pageContext.request.contextPath}/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript">

        function check() {

            var mail = $("#email").val();
            if (mail == "") {//检测Email是否为空
                alert("账号不能为空");
                return false;
            }

            var repwd = $("#repwd").val();
            if(repwd != pwd) {
                alert("两次密码输入不一致");
                return false;
            }

            return true;
        }

        $(function () {
            //提交表单
            $("#myform").submit(function () {
                return check();
            });
        });

    </script>
</head>

<body>
<div class="main">
    <table id="center" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td>
                <img src="${pageContext.request.contextPath}/img/dl_l_t.gif"/></td>
        </tr>
        <tr>
            <td class="bg">

                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="bold">注册益书</td>
                    </tr>
                    <form action="${pageContext.request.contextPath}/register" method="post" id="myform" name="myform">
                        <tr>
                            <td>您的账号:<input id="email" type="text" class="inputs" name="userName"/></td>
                        </tr>
                        <tr>
                            <td>您的密码:<input id="pwd" type="password" class="inputs" name="password"/></td>
                        </tr>
                        <tr>
                            <td class="left">密码确认:<input id="repwd" type="password" class="inputs" /></td>
                        </tr>
                        <tr>
                            <td style="height: 35px; padding-left: 30px;">
                                <input name="btn" id="btn" type="submit" value="注册" class="rb1"/></td>
                        </tr>
                    </form>
                    <tr>
                        <td style="height: 35px; padding-left: 30px; color: #d32c47">
                            ${result}</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <img src="${pageContext.request.contextPath}/img/dl_l_b.gif" width="362" height="5"/></td>
        </tr>
    </table>
</div>
</body>
</html>
